package com.wnx.action;

import java.util.List;
import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.wnx.db.UserDao;
import com.wnx.entity.Users;

public class UserInfoAction extends ActionSupport {
	private int id;
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	public String execute() throws Exception {
			UserDao ud = new UserDao();
			List<Users> users = ud.getUsersAll(this.id);
			Map<String, Object> session = ActionContext.getContext().getSession();
			session.put("users", users.get(0));
			return SUCCESS;
		
	}
}
